package com.ls.lserp.modules.finance.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ls.lserp.common.persistence.Page;
import com.ls.lserp.common.service.CrudService;
import com.ls.lserp.dbaccess.Entity.OgnizationSettlementEntity;
import com.ls.lserp.modules.finance.dao.InitCustomerDao;
import com.ls.lserp.modules.finance.dao.InitFinanceDao;
import com.ls.lserp.modules.finance.entity.InitCustomer;
import com.ls.lserp.modules.finance.entity.InitFinance;


@Service
@Transactional(readOnly = false)
public class InitCustomerService extends CrudService<InitCustomerDao,InitCustomer>{

	@Autowired
    private InitCustomerDao initCustomerDao;
	@Autowired
    private InitFinanceDao initFinanceDao;
	/**
	 * 查询父项
	 * @param page
	 * @param user
	 * @return
	 */
    public Page<OgnizationSettlementEntity> findList(Page<OgnizationSettlementEntity> page, OgnizationSettlementEntity settlementEntity) {
        // 生成数据权限过滤条件（dsf为dataScopeFilter的简写，在xml中使用 ${sqlMap.dsf}调用权限SQL）
        //designOption.getSqlMap().put("dsf", dataScopeFilter(user.getCurrentUser(), "o", "a"));
        // 设置分页参数
    	settlementEntity.setPage(page);
        // 执行分页查询
        page.setList(initFinanceDao.findListByOgnization(settlementEntity));
        return page;
    }
}
